using System.Collections;
using UnityEngine;

public class UpdateColliderSize : MonoBehaviour
{
	private IEnumerator Start()
	{
		yield return new WaitForEndOfFrame();
		Vector2 size = base.gameObject.GetComponent<RectTransform>().rect.size;
		BoxCollider2D collider = base.gameObject.GetComponent<BoxCollider2D>();
		collider.size = size;
		BoxCollider2D boxCollider2D = collider;
		Vector3 localPosition = base.gameObject.GetComponent<RectTransform>().localPosition;
		float x = localPosition.x;
		Vector3 localPosition2 = base.gameObject.GetComponent<RectTransform>().localPosition;
		boxCollider2D.offset = new Vector2(x, localPosition2.y);
	}
}
